differentiation tangents and normals